<template>
  <div id='DetailParam' class='DetailParam' v-if="Object.keys(paramsInfo).length !== 0">
    <table class="tab1">
      <tr v-for="(item,index) in paramsInfo.sizes[0]" :key="index">
        <td v-for="(itemDate,index) in item" :key="index">{{itemDate}}</td>
      </tr>
    </table>
    <table class="tab2">
      <tr v-for="(items,index) in paramsInfo.infos" :key="index">
        <td>{{items.key}}</td>
        <td class="value-color">{{items.value}}</td>
      </tr>
    </table>
    <div params-img>
      <img :src="paramsInfo.image" alt="" srcset="">
    </div>
  </div>
</template>

<script>
  export default {
    name: 'DetailParam',
    props: { // 父辈向子辈传参
      paramsInfo: {
        type: Object,
        default () {
          return {}
        }
      }
    },
    components: { // 组件的引用

    },
    data() {
      return {

      }
    },
    methods: { // 方法

    },
    computed: { // 计算属性

    },
    created() { // 实例被创建之后执行代码

    },
    mounted() { // 页面进入时加载内容

    },
    watch: { // 监测变化

    }
  }

</script>
<style scoped>
  .DetailParam {
    padding: 15px;
    padding-bottom: 0;
  }

  .tab1,
  .tab2 {
    width: 100%;
    font-size: 15px;
    border-bottom: 3px solid #efe7e7
  }

  tr {
    height: 50px;
    border-bottom: 1px solid #efe7e7;
  }

  .tab2 td:nth-of-type(1) {
    width: 25%;
  }

  .value-color {
    color: var(--color-high-text);
  }

  .params-img img {
    width: 100%;
    height: 100%;
  }

</style>
